package com.qf.day07;

public class Demo2 {
    public static void main(String[] args) {
        Fish fish = new Fish("草鱼",2,"男");
        System.out.println(fish);
        fish.swim();
        fish.eat();
        fish.sleep();

        Fish fish1 = new Fish();
        System.out.println(fish1);

        Fish fish2 = new Fish();
        fish2.setAge(3);
        fish2.setType("罗非鱼");
        fish2.setSex("女");
        System.out.println(fish2);

        SmallFish smallFish = new SmallFish();
        smallFish.setHoddy("酷酷游泳");
        smallFish.eat();
        System.out.println(smallFish);

    }
}
